module xorLogicC
{
  provides
  {
  	interface IXorLogic;
  }
}

implementation
{
	/*
	 	XOR
	 	------------------
		A   B     Output 
	  	0 	0 		0
		0 	1 		1
		1 	0 		1
		1 	1 		0
	    ------------------
	*/
	
	/*
	 * 
	 * */
	command nx_int8_t IXorLogic.XORDecoding(nx_int8_t originalMessage, nx_int8_t receivedMessage){
		return originalMessage ^ receivedMessage;
	}

	command nx_int8_t IXorLogic.XOREncoding(nx_int8_t messageA, nx_int8_t messageB){
		return messageA ^ messageB;
	}
}